package com.example.service1.common.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Data
@AllArgsConstructor
@Accessors(chain = true)
public class TestDto {
    private String name;
    private long age;
    private LocalDate localDate;
    private List<String> list;

    public TestDto(){
    }

    public static TestDto defaultCreate(){
        TestDto testDto = new TestDto();
        testDto.name = "默认字符串";
        testDto.age = 16L;
        testDto.localDate = LocalDate.now();
        testDto.list = new ArrayList<>(Arrays.asList("元素1","元素2"));
        return testDto;
    }

    @Override
    public String toString() {
        return "TestDto{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", localDate=" + localDate +
                ", list=" + list +
                '}';
    }
}
